<template>
  <div>
     <el-container>
      <!-- 左侧-->
      <Menu :isCollapse="isCollapse"></Menu>
      <!-- 右侧 -->
      <el-container>
        <el-header>
          <Header></Header>
        </el-header>
        <Tab @myCollapseFlag="myCollapseFlag"></Tab>
        <el-main><Main></Main></el-main>
        <el-footer><Footer></Footer></el-footer>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import Menu from './menu'
import Header from './header'
import Tab from './tab'
import Main from './main'
import Footer from './footer'
export default {
  name: 'Layout',
  components: {
    Menu,
    Header,
    Tab,
    Main,
    Footer
  },
  data () {
    return {
      msg: 'Welcome to Your Vue.js App',
      isCollapse: false
    }
  },
  mounted () {
  },
  methods: {
    // 接收tab子组件传值方法
    myCollapseFlag (flag) {
      this.isCollapse = flag
    }
  }
}
</script>

<style scoped>
  .el-aside {
    background-color: #D3DCE6;
    color: #333;
    width:20rem !important;
    height: calc(100vh);
    font-size: 1.6rem;
  }
  .el-header{
    height: 5rem !important;
    background-color: rgb(8, 189, 249);
  }
  .el-footer{
    height: 3rem !important;
    text-align:center;
  }
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    height: calc(100vh - 140px);
  }
</style>
